package com.wyq.service.impl;

import java.util.List;
import java.util.Map;

import com.wyq.bean.ShowInfo;
import com.wyq.dao.ShowInfoDAO;
import com.wyq.service.ShowInfoService;

public class ShowInfoServiceImpl implements ShowInfoService {
	private ShowInfoDAO showInfoDao;

	public List getShowInfoById(String id) throws Exception {
		return showInfoDao.getShowInfoById(id);
	}
	
	public int saveShowInfo(ShowInfo showInfo) throws Exception {
		return showInfoDao.insertShowInfo(showInfo);
	}

	public int updateShowInfo(Map showInfo) throws Exception {
		return showInfoDao.updateShowInfo(showInfo);
	}

	@Override
	public List findPageShowInfos(String start, String limit)
			throws Exception {
		return showInfoDao.findPageShowInfos(start, limit);
	}
	
	/**
	 * 根据type或urlChannel获取产会信息
	 */
	public List getShowInfoByTypeOrUrlChannel(String type,String urlChannel) throws Exception{
		return showInfoDao.getShowInfoByTypeOrUrlChannel(type, urlChannel);
	}
	
	/**
	 * 删除展会
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteById(String id) throws Exception{
		return showInfoDao.deleteById(id);
	}
	
	/**
	 * 获取所有的展会信息
	 * @return
	 * @throws Exception
	 */
	public List getAllShowInfo(String isAvailable) throws Exception{
		return showInfoDao.getAllShowInfo(isAvailable);
	}
	

	public void setShowInfoDao(ShowInfoDAO showInfoDao) {
		this.showInfoDao = showInfoDao;
	}

	public ShowInfoDAO getShowInfoDao() {
		return showInfoDao;
	}
	
	
}
